import { createRouter, createWebHistory } from 'vue-router'
import HotspotSystem from '../components/HotspotSystem.vue'
import HotspotRadar from '../components/HotspotRadar.vue'
import CreationFactory from '../components/creationFactory.vue'

const routes = [
  {
    path: '/',
    component: HotspotSystem,  // 所有子路由都共享这个布局组件
    children: [
      {
        path: '',
        redirect: '/hotspot'
      },
      {
        path: '/hotspot',
        name: 'Hotspot',
        component: HotspotRadar
      },
      {
        path: '/creation',
        name: 'Creation',
        component: CreationFactory
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
